﻿//自动切换用户网络类型（NetType：1为电信，2为网通）
var area; //所在网络 1：电信 2：网通
var autoCheckNetWork = function () {
    if (area == undefined) {
        var data = "jsoncallback=?";
        //电信http://www.eee114.com/userlogin/RefreshMemberState.aspx
        jQuery.getJSON("http://jxdxkj.eee114.com/refresh.aspx",
					data,
					function (data) {
					    if (area == undefined) {
					        area = 1;
					        if (getck("server") == "")
					            setCookie("server", 1, msPerMonth, domain);
					    }
					}
				);
        //网通
        jQuery.getJSON("http://jxwtkj.eee114.com:807/refresh.aspx",
					data,
					function (data) {
					    if (area == undefined) {
					        area = 2;
					        if (getck("server") == "")
					            setCookie("server", 2, msPerMonth, domain);
					    }
					}
				);

    }
    else {
        alert(area);
    }
}
